package com.ischoolbar.programmer.controller.home;

import com.ischoolbar.programmer.entity.admin.User;
import com.ischoolbar.programmer.service.admin.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Losca
 * @date 2022/5/2 17:09
 */
@RequestMapping("/mes")
@Controller
public class MessagePageControler {
    @Autowired
    UserService userService;
    @RequestMapping("/test")
    public String test(ModelMap map){
        List<User> allAdmin = userService.findAllAdmin();
        map.addAttribute("allAdmin",allAdmin);
        return "home/common/test";
    }

    @RequestMapping("/test2")
    public String test2(){
        return "home/common/test2";
    }

    @RequestMapping("/adminMes")
    public String adminMes(){
        return "system/test";
    }


}
